<template>
	<view>
		<!-- 搜索无记录 -->
		<zy-empty v-if="this.cardinfo.length==0"></zy-empty>
		<view class="container" v-for="(item,index) in cardinfo" :key="index">
			<zy-group :title="$t('public.createTime')+$t('public.colon') + item.createTime" model="insideCard">
				<view class="slot">
					<view class="text">
						<text class="sub">{{$t('homepage.WarehouseManage.storageCode')}}</text>
						<view class="subContent">{{item.warehousePositionCode}}-{{item.warehouseStorageCode}}</view>
					</view>
					<view class="text">
						<text class="sub">{{$t('public.materialCode')}}</text>
						<view class="subContent">{{item.materialCode}}</view>
					</view>
					<view class="text">
						<text class="sub">{{$t('public.materialName')}}</text>
						<view class="subContent">{{item.materialName}}</view>
					</view>
					<view class="text">
						<text class="sub">{{$t('public.materialSpec')}}</text>
						<view class="subContent">{{item.materialSpec}}</view>
					</view>
					<view class="text">
						<text class="sub">{{$t('homepage.WarehouseManage.stockNum')}}</text>
						<view class="subContent">{{item.num}}{{$t('public.piece')}}</view>
					</view>
				</view>
			</zy-group>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				scrollTop: 0,
				cardinfo: [],
			}
		},
		onLoad() {
			this.cardinfo = []
			this.cardinfo = this.$store.state.storageInfo
		},
	};
</script>

<style lang="scss" scoped>
	.slot {
		padding: 0 20rpx;
	}

	.text {
		padding: 10rpx 0;
		display: flex;
		text-align: justify;
	}

	.sub {
		text-align: left;
	}

	.subContent {
		display: flex;
		margin: auto 20rpx auto auto;
		color: #999999;
	}
</style>